package com.zzyl.controller;

import com.zzyl.base.ResponseResult;
import com.zzyl.dto.LoginDto;
import com.zzyl.service.UserService;
import com.zzyl.vo.UserVo;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/security")
@Api(tags = "后台用户登陆接口")
public class LoginController {


    @Autowired
    private UserService userService;


    @PostMapping("/login")
    public ResponseResult login(@RequestBody LoginDto loginDto){
        UserVo userVo=userService.login(loginDto);
        return ResponseResult.success(userVo);
    }

    @GetMapping("/abc")
    public ResponseResult abc(){
        return ResponseResult.success("abc");
    }
}
